<%
	load 'templates/icons.rb'
	icons = getGroupedIcons()

	image_width = 888

	icon_count = icons.length
	spacing = 5
	rows = 2
	icon_count = icon_count / rows + 1
	total_spacing = 2 * spacing * icon_count
	icon_size = (image_width - total_spacing) / icon_count
%>

<link href="osi.css" rel="stylesheet">

<style>
	.preview-icon {
		padding: <%= spacing %>px;
	}
	.icon-container {
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	body {
		margin: -<%= spacing %>px;
		width: <%= image_width%>px;
		font-size: <%= icon_size %>;
		color: #333;
	}
</style>

<body>
	<div class="icon-container">
		<% icons.each do |name, value| %><span class="preview-icon os-<%= name %>"></span><% end %>
	</div>
</body>
